import request from '../utils/requset'

// 轮播图
export const getLunbo = () => {
    return request({
        method: 'GET',
        url: 'getlunbo'
    })
}
// 图文资讯
export const getnewsList = () => {
    return request({
        method: 'GET',
        url: 'getnewslist'
    })
}
// 资讯详情
export const getNew = (newid) => {
    return request({
        method: 'GET',
        url: `getnew/${newid}`,

    })
}
// 获取评论信息
export const getCommentsAPI = (id, params) => {
    return request({
        method: 'GET',
        url: `getcomments/${id}`,
        params,
    })
}
// 提交评论信息
export const postcommentAPI = (id, data) => {
    return request({
        method: 'POST',
        url: `postcomment/${id}`,
        data,
    })
}
// 图片分类数据
export const getimgcategoryAPI = () => {
    return request({
        method: 'GET',
        url: 'getimgcategory',
    })
}

// 图片列表数据

export const getimagesAPI = (id) => {
    return request({
        method: 'GET',
        url: `getimages/${id}`,
    })
}
// 图片详情
export const getimageInfoAPI = (id) => {
    return request({
        method: 'GET',
        url: `getimageInfo/${id}`,
    })
}
// 图片分享详情中的缩略图数组
export const getthumimagesAPI = (id) => {
    return request({
        method: 'GET',
        url: `getthumimages/${id}`,
    })
}
// 一、首页轮播图
export const getgoodsAPI = (params) => {
    return request({
        method: 'get',
        url: '/getgoods',
        params
    })
}